# Scrapy settings for dishonesty project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
#     https://docs.scrapy.org/en/latest/topics/settings.html
#     https://docs.scrapy.org/en/latest/topics/downloader-middleware.html
#     https://docs.scrapy.org/en/latest/topics/spider-middleware.html

BOT_NAME = 'dishonesty'

SPIDER_MODULES = ['dishonesty.spiders']
NEWSPIDER_MODULE = 'dishonesty.spiders'


# Crawl responsibly by identifying yourself (and your website) on the user-agent
#USER_AGENT = 'dishonesty (+http://www.yourdomain.com)'

# Obey robots.txt rules
ROBOTSTXT_OBEY = False   # 变一下,不然获取不到

# Configure maximum concurrent requests performed by Scrapy (default: 16)
#CONCURRENT_REQUESTS = 32

# Configure a delay for requests for the same website (default: 0)
# See https://docs.scrapy.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
#DOWNLOAD_DELAY = 3
# The download delay setting will honor only one of:
#CONCURRENT_REQUESTS_PER_DOMAIN = 16
#CONCURRENT_REQUESTS_PER_IP = 16

# Disable cookies (enabled by default)
#COOKIES_ENABLED = False

# Disable Telnet Console (enabled by default)
#TELNETCONSOLE_ENABLED = False

# Override the default request headers:
# DEFAULT_REQUEST_HEADERS = {
#    # 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
#    # 'Accept-Language': 'en',
#    # 'Referer': 'https://www.baidu.com/s?wd=%E5%A4%B1%E4%BF%A1%E4%BA%BA&rsv_spt=1&rsv_iqid=0xa3f551c800244d1a&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_dl=tb&rsv_enter=1&rsv_btype=t&inputT=3441&rsv_t=15968f0E6t4M3zQ7XOuQhFlS%2BV4YuFV2%2BwIXf9Eeh1otXrdSsLKT1fohEiPAHV7oZqty&rsv_sug3=11&rsv_sug1=8&rsv_sug7=100&oq=51job&rsv_pq=e98a5059000a4d1c&rsv_sug2=0&rsv_sug4=3970',
#    'Referer': 'https://www.baidu.com/s?wd=%E5%A4%B1%E4%BF%A1%E4%BA%BA&rsv_spt=1&rsv_iqid=0xa3f551c800244d1a&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_dl=tb&rsv_enter=1&rsv_btype=t&inputT=3441&rsv_t=15968f0E6t4M3zQ7XOuQhFlS%2BV4YuFV2%2BwIXf9Eeh1otXrdSsLKT1fohEiPAHV7oZqty&rsv_sug3=11&rsv_sug1=8&rsv_sug7=100&oq=51job&rsv_pq=e98a5059000a4d1c&rsv_sug2=0&rsv_sug4=3970',
#    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.81 Safari/537.36 SE 2.X MetaSr 1.0',
#    "cookie":'BAIDUID=64F212BEF1C818A020A097E0AF99A567:FG=1; BIDUPSID=64F212BEF1C818A020A097E0AF99A567; PSTM=1588495682; BDUSS=0RtY0F4aUtoc3lHc3J2c0dkTWlzQ0ROLXRIaWZKMXo3MHJUWjRtU0JtWlFZU1ZmRVFBQUFBJCQAAAAAAAAAAAEAAADeYvzqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFDU~V5Q1P1eM; MCITY=-256%3A; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598; BDSFRCVID=8kPOJexroG3_SMJr5f85T93rh2KK0PjTDYLEnz_V310U8F_VNl15EG0PtDR8-Hk-ox_vogKK0gOTH6KF_2uxOjjg8UtVJeC6EG0Ptf8g0M5; H_BDCLCKID_SF=tRk8oI-5tIvMqRjnbDIhDtIe-mT22-usfI3T2hcHMPoosIO30UckK6LEeaonq6JH2nriaKJx2fbUoqRHhR6r36JLDb_O0qRpBDtD_l5TtUJMsM_9qf7Oqt4bBpjyKMnitIv9-pPKWhQrh459XP68bTkA5bjZKxtq3mkjbPbDfn028DKu-n5jHjoXjaDe3j; delPer=0; PSINO=6; BDUSS_BFESS=0RtY0F4aUtoc3lHc3J2c0dkTWlzQ0ROLXRIaWZKMXo3MHJUWjRtU0JtWlFZU1ZmRVFBQUFBJCQAAAAAAAAAAAEAAADeYvzqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFDU~V5Q1P1eM; BDRCVFR[feWj1Vr5u3D]=mk3SLVN4HKm; H_PS_PSSID=32294_1458_32439_32361_31660_32045_32398_32405_32429_31525_32116_31709_32435; __yjsv5_shitong=1.0_7_8b2e8ce73b4dc174bc3fc7fbc30c9c2df4d8_300_1596329012731_171.215.82.107_f8c46e04; yjs_js_security_passport=51e2030ebd8c6a93a27caa5661901df0a05f02f3_1596329013_js'
# }

# Enable or disable spider middlewares
# See https://docs.scrapy.org/en/latest/topics/spider-middleware.html
#SPIDER_MIDDLEWARES = {
#    'dishonesty.middlewares.DishonestySpiderMiddleware': 543,
#}

# Enable or disable downloader middlewares
# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html
#DOWNLOADER_MIDDLEWARES = {
#    'dishonesty.middlewares.DishonestyDownloaderMiddleware': 543,
#}

# Enable or disable extensions
# See https://docs.scrapy.org/en/latest/topics/extensions.html
#EXTENSIONS = {
#    'scrapy.extensions.telnet.TelnetConsole': None,
#}

# Configure item pipelines
# See https://docs.scrapy.org/en/latest/topics/item-pipeline.html
ITEM_PIPELINES = {
   'dishonesty.pipelines.DishonestyPipeline': 300,
}

# Enable and configure the AutoThrottle extension (disabled by default)
# See https://docs.scrapy.org/en/latest/topics/autothrottle.html
#AUTOTHROTTLE_ENABLED = True
# The initial download delay
#AUTOTHROTTLE_START_DELAY = 5
# The maximum download delay to be set in case of high latencies
#AUTOTHROTTLE_MAX_DELAY = 60
# The average number of requests Scrapy should be sending in parallel to
# each remote server
#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
#AUTOTHROTTLE_DEBUG = False

# Enable and configure HTTP caching (disabled by default)
# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
#HTTPCACHE_ENABLED = True
#HTTPCACHE_EXPIRATION_SECS = 0
#HTTPCACHE_DIR = 'httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES = []
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
